package com.demo.enums;

/**
 * 诊断类别：1 Caprini(外科) 2 Padua(内科)
 *
 */
public enum PreventiveTypeEnum {
    CAPRINI(1, "Caprini(外科)"),
    PADUA(2, "Padua(内科)");

    private int value;
    private String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    PreventiveTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static PreventiveTypeEnum getByValue(Integer value) {
        for (PreventiveTypeEnum item : values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
